'use strict';

const Controller = require('egg').Controller;

class BaseControllerController extends Controller {
  get user(){
    return {
      name: '赵渝航',
      age: 28
    }
  }
  success(data){
    this.ctx.body = {
      code: 200,
      data
    }
  }
  notFound(msg){
    this.ctx.throw(404, msg || 'Not Found');
  }
}

module.exports = BaseControllerController;
